<%@ page pageEncoding="UTF-8"%>

<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="/tags/struts-nested" prefix="nested"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix='fmt'%>
<%@ taglib uri="/tags/trymore" prefix="tm"%>

<script type="text/javascript">
	function callback_profRemove(id) {
		if ($("#prof-" + id).size() > 0) {
			$("#prof-" + id).fadeOut("slow");
		}
	}
</script>

<table class="table" width="100%" layoutH="138">
	<thead>
		<tr>
			<th align="center" width="35px;">序号</th>
			<th align="center">姓名</th>
			<th align="center">单位名称</th>
			<th align="center">部门</th>
			<th align="center">职务</th>
			<th align="center">职称</th>
			<th align="center">办公室电话</th>
			<th align="center">手机</th>
			<th align="center">邮箱</th>
			<th align="center">研究方向</th>
			<th align="center" width="80px;">专家详细</th>
			<th align="center" width="80px;">专家编辑</th>
			<th align="center" width="80px;">专家删除</th>
		</tr>
	</thead>
	<tbody>
		<logic:present name="datagrid">
			<logic:iterate name="datagrid" property="items" id="entity" indexId="idx">
				<tr id="prof-${entity.id}" ${idx % 2 == 1 ? 'style="background-color: #F5F5F5"' : ''}>
					<td>${idx+1}</td>
					<td>${entity.fullName ne null && entity.fullName ne "" ? entity.fullName : '无'}</td>
					<td>${entity.companyName ne null && entity.companyName ne "" ? entity.companyName : '无'}</td>
					<td>${entity.department ne null && entity.department ne "" ? entity.department : '无'}</td>
					<td>${entity.jobDuty ne null && entity.jobDuty ne "" ? entity.jobDuty : '无'}</td>
					<td>${entity.jobTitle ne null && entity.jobTitle ne "" ? entity.jobTitle : '无'}</td>
					<td>${entity.officePhone ne null && entity.officePhone ne "" ? entity.officePhone : '无'}</td>
					<td>${entity.mobilePhone ne null && entity.mobilePhone ne "" ? entity.mobilePhone : '无'}</td>
					<td>${entity.email ne null && entity.email ne "" ? entity.email : '无'}</td>
					<td>${entity.researchArea ne null && entity.researchArea ne "" ? entity.researchArea : '无'}</td>
					<td>
						<a href="app/proficient.do?action=dialogProficientPage&id=${entity.id}&op=view" 
							target="dialog" title="专家明细 - ${entity.fullName}" class="oplink" width="900" height="570" rel="profmgr_view${group.id}">详细</a>
					</td>
					<td>
						<a href="app/proficient.do?action=dialogProficientPage&id=${entity.id}" 
							target="dialog" title="专家编辑 - ${entity.fullName}" class="oplink" width="900" height="570" rel="profmgr_edit${group.id}">编辑</a>
					</td>
					<td>
						<a href="app/proficient.do?action=actionRemoveProficient&id=${entity.id}" 
							target="ajaxToDo" title="确定要删除`${entity.fullName}`专家么?" callback="callback_profRemove(${entity.id})" class="oplink">删除</a>
					</td>
				</tr>
			</logic:iterate>
		</logic:present>
	</tbody>
</table>

<!-- Pagination -->
<div class="panelBar">
	<div class="pages">
		<span>显示</span>
		<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
			<option value="20" ${pagingBean ne null && pagingBean.pageSize eq 20 ? 'selected="selected"' : ''}>20</option>
			<option value="50" ${pagingBean ne null && pagingBean.pageSize eq 50 ? 'selected="selected"' : ''}>50</option>
			<option value="100" ${pagingBean ne null && pagingBean.pageSize eq 100 ? 'selected="selected"' : ''}>100</option>
			<option value="200" ${pagingBean ne null && pagingBean.pageSize eq 200 ? 'selected="selected"' : ''}>200</option>
		</select>
		<span>条，共${pagingBean ne null ? pagingBean.totalItems : 0}条</span>
	</div>
	<div class="pagination" targetType="navTab" totalCount="${pagingBean ne null ? pagingBean.totalItems : 0}" numPerPage="${pagingBean ne null ? pagingBean.pageSize : 20}" pageNumShown="${pagingBean ne null ? pagingBean.pageNumShown : 10}" currentPage="${pagingBean ne null ? pagingBean.currentPage : 1}"></div>
</div>